package org.candan.spider.task;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.candan.spider.bean.Plan;
import org.candan.spider.bean.Task;

public interface IPlanService {
	
	/**
	 * @category 将某日的计划添加到容器中
	 * @param date
	 */
	public abstract void initPlan(Date date);
	
	/**
	 * @category 修改任务
	 * @param task
	 * @return TODO
	 */
	public abstract boolean modifyPlan(Plan plan);

	/**
	 * @category 创建任务
	 * @param Plan
	 */
	public abstract void createPlan(Plan plan);
	
	/**
	 * @category 删除任务
	 * @param id
	 */
	public abstract void deletePlanByID(String id);
	
	public abstract boolean deletePlan(Plan plan);

	/**
	 * @category 查询Plan
	 * @category 
	 * @param id
	 * @return
	 */
	public abstract Plan searchPlanByID(String id);
	
	public abstract List<Plan> searchAllPlan(String date);
	
	public abstract String searchAllPlanXml(String date);
	public abstract boolean createDayPlans(Map<String,Task> tasks, Date fromTime,boolean isCover);
	
	public abstract void runPlans(Map<String,Plan> plans);
}
